<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePaperCommitsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('paper_commits', function (Blueprint $table) {
            $table->increments('id')->comment('问卷调查答题表');
            $table->integer('paper_feedback_id')->nullable()->comment('题目ID')->default(0);
            $table->integer('paper_librarie_id')->nullable()->comment('试卷ID')->default(0);
            $table->integer('user_id')->nullable()->comment('用户id')->default(0);
            $table->string('answer', 255)->nullable()->comment('答案');
            $table->tinyInteger('status')->nullable()->comment('状态;未处理0、处理中1、已处理2')->default(1);
            $table->integer('region_id')->nullable()->comment('所属地区ID（1.北洸村）')->default(0);
            $table->string('batch_num', 64)->nullable()->comment('提交批次编码');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('paper_commits');
    }
}
